package javax.microedition.pim;

public interface PIMItem {
  public static final int ATTR_NONE = 0;
  public static final int BINARY = 0;
  public static final int BOOLEAN = 1;
  public static final int DATE = 2;
  public static final int EXTENDED_ATTRIBUTE_MIN_VALUE = 16777216;
  public static final int EXTENDED_FIELD_MIN_VALUE = 16777216;
  public static final int INT = 3;
  public static final int STRING = 4;
  public static final int STRING_ARRAY = 5;

  PIMList getPIMList();

  void commit() throws PIMException;

  boolean isModified();

  int[] getFields();

  byte[] getBinary(int field, int index);

  void addBinary(int field, int attributes, byte[] value, int offset, int length);

  void setBinary(int field, int index, int attributes, byte[] value, int offset, int length);

  long getDate(int field, int index);

  void addDate(int field, int attributes, long value);

  void setDate(int field, int index, int attributes, long value);

  int getInt(int field, int index);

  void addInt(int field, int attributes, int value);

  void setInt(int field, int index, int attributes, int value);

  String getString(int field, int index);

  void addString(int field, int attributes, String value);

  public void setString(int field, int index, int attributes, String value);

  public boolean getBoolean(int field, int index);

  public void addBoolean(int field, int attributes, boolean value);

  public void setBoolean(int field, int index, int attributes, boolean value);

  String[] getStringArray(int field, int index);

  void addStringArray(int field, int attributes, String[] value);

  void setStringArray(int field, int index, int attributes, String[] value);

  public int countValues(int field);

  public void removeValue(int field, int index);

  public int getAttributes(int field, int index);

  void addToCategory(String category) throws PIMException;

  void removeFromCategory(java.lang.String category);

  String[] getCategories();

  int maxCategories();
}